<link href="/classico/public/assets/modules/toolbar.css" rel="stylesheet" type="text/css"/>
<?php
$controllerName = $this->controllerName
?>
<div id="toolbar">
    <div>
        <?= $controllerName ?> manager
    </div>
    <ul>
        <li id="tool-btn-add" class="enabled-tool-btn">
            <div class="enabled-add-icon tool-icon"></div>
            <span>New</span>
        </li>
        <li id="tool-btn-delete" class="enabled-tool-btn">
            <form action="/classico/public/admin/<?= $controllerName ?>/delete" method="post">
                <input type="hidden" name="isPost" value=""/>
            </form>
            <div class="enabled-delete-icon tool-icon"></div>
            <span>Delete</span>
        </li>
        <li id="tool-btn-update" class="enabled-tool-btn">
            <div class="enabled-update-icon tool-icon"></div>
            <span>Update</span>
        </li>
        <li id="tool-btn-confirm" class="enabled-tool-btn">
            <form action="/classico/public/admin/<?= $controllerName ?>/confirm">
                <input type="hidden" name="isPost" value=""/>
            </form>
            <div class="enabled-confirm-icon tool-icon"></div>
            <span>Confirm</span>
        </li>
        <li id="tool-btn-unblock" class="enabled-tool-btn">
            <form action="/classico/public/admin/<?= $controllerName ?>/unblock">
                <input type="hidden" name="isPost" value=""/>
            </form>
            <div class="enabled-unblock-icon tool-icon"></div>
            <span>Unblock</span>
        </li>
        <li id="tool-btn-block" class="enabled-tool-btn">
            <form action="/classico/public/admin/<?= $controllerName ?>/block">
                <input type="hidden" name="isPost" value=""/>
            </form>
            <div class="enabled-block-icon tool-icon"></div>
            <span>Block</span>
        </li>
    </ul>
</div>
<script type="text/javascript">
    $('#tool-btn-add.enabled-tool-btn').click(function () {
        var name = $(this).attr('class');
        if (name == 'enabled-tool-btn') {
            location.href = '/classico/public/admin/<?= $controllerName ?>/add';
        }
    });
</script>